import request from '@/utils/request'

// 查询天线列表
export function listAntenna(query) {
  return request({
    url: '/business/antenna/list',
    method: 'get',
    params: query
  })
}

// 查询天线详细
export function getAntenna(antennaId) {
  return request({
    url: '/business/antenna/' + antennaId,
    method: 'get'
  })
}

// 新增天线
export function addAntenna(data) {
  return request({
    url: '/business/antenna',
    method: 'post',
    data: data
  })
}

// 修改天线
export function updateAntenna(data) {
  return request({
    url: '/business/antenna',
    method: 'put',
    data: data
  })
}

// 删除天线
export function delAntenna(antennaId) {
  return request({
    url: '/business/antenna/' + antennaId,
    method: 'delete'
  })
}


// 获取天线集合
export function getAntennaListAll(locatedAddress) {
  let url = '/business/antenna/listAll';
  if(locatedAddress){
      url = '/business/antenna/listAll?locatedAddress=' + locatedAddress
  }
  return request({
    url: url,
    method: 'get'
  })
}
